tests: Fix karg tests on ostree-booted system
authorColin Walters <walters@verbum.org>
Fri, 8 Jul 2016 14:54:11 +0000 (10:54 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Mon, 11 Jul 2016 16:46:07 +0000 (16:46 +0000)
https://github.com/ostreedev/ostree/pull/372 caused these tests to
start failing when the host system is managed using ostree - since the
tests *do* replace the `ostree=` kernel argument.

Closes: #384
Approved by: cgwalters

tests/test-admin-deploy-karg.sh
tests/test-admin-instutil-set-kargs.sh

index 1165b4289347196c2a6bf23b2f1f0d725a86a523..b7305f4cca9f28ab89b77b9ca607c378908960f7 100755 (executable)
@@ -44,7 +44,12 @@ echo "ok deploy with --karg, but same config"
 
 ${CMD_PREFIX} ostree admin deploy --karg-proc-cmdline --os=testos testos:testos/buildmaster/x86_64-runtime
 for arg in $(cat /proc/cmdline); do
-    assert_file_has_content sysroot/boot/loader/entries/ostree-testos-0.conf "options.*$arg"
+    case "$arg" in
+       ostree=*) # Skip ostree arg that gets stripped out
+          ;;
+       *) assert_file_has_content sysroot/boot/loader/entries/ostree-testos-0.conf "options.*$arg"
+          ;;
+    esac
 done
 
 echo "ok deploy --karg-proc-cmdline"
index d2abec2e2349c5bebcfcf167fe70d465345a8aab..40f4b74683b143f452e194cb81b37b737745ca37 100755 (executable)
@@ -55,6 +55,11 @@ echo "ok instutil set-kargs --append"
 
 ${CMD_PREFIX} ostree admin instutil set-kargs --import-proc-cmdline
 for arg in $(cat /proc/cmdline); do
-    assert_file_has_content sysroot/boot/loader/entries/ostree-testos-0.conf "options.*$arg"
+    case "$arg" in
+       ostree=*) # Skip ostree arg that gets stripped out
+          ;;
+       *) assert_file_has_content sysroot/boot/loader/entries/ostree-testos-0.conf "options.*$arg"
+          ;;
+    esac
 done
 echo "ok instutil set-kargs --import-proc-cmdline"